package com.wiken.orderservice.controller;


import com.wiken.orderservice.entity.OrderCommodity;
import com.wiken.orderservice.service.impl.OrderCommodityServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wiken
 * @since 2022-12-28
 */
@RestController
@RequestMapping("/orderservice/order-commodity")
public class OrderCommodityController {
    @Autowired
    OrderCommodityServiceImpl orderCommodityService;

    @GetMapping("updateOrderCommodityStatus")
    boolean updateOrderCommodityStatus(@RequestParam(value = "orderCommodityId") String orderCommodityId,
                                       @RequestParam(value="status") Integer status){
        boolean success = orderCommodityService.updateOrderCommodityStatus(orderCommodityId, status);

        return success;
    }
}
